From: Cosimo Cecchi Date: Fri, 23 Sep 2011 01:39:32 +0000 (-0400) Subject: util: don't depend on the nautilus GSettings schema X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~7406 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=18d69d70327f863226defea4ed06ef541d7ea5c9;p=gnome-shell.git util: don't depend on the nautilus GSettings schema Without the desktop, even Nautilus hardcodes "Home" in all places nowadays (except for the desktop itself). I think a run-time dependency on nautilus being installed (GSettings will abort if the schema is not found) is not worth it to keep compatibility with the desktop. (Also, nautilus itself could probably hardcode "Home" for the desktop as well and remove the preference). https://bugzilla.gnome.org/show_bug.cgi?id=659895 --- diff --git a/src/shell-util.c b/src/shell-util.c index bdf2330e4..0f5e16463 100644 --- a/src/shell-util.c +++ b/src/shell-util.c @@ -75,8 +75,6 @@ shell_util_get_file_display_name_if_mount (GFile *file) return ret; } -#define HOME_NAME_SCHEMA "org.gnome.nautilus.desktop" -#define HOME_NAME_KEY "home-icon-name" static char * shell_util_get_file_display_for_common_files (GFile *file) { @@ -85,26 +83,11 @@ shell_util_get_file_display_for_common_files (GFile *file) compare = g_file_new_for_path (g_get_home_dir ()); if (g_file_equal (file, compare)) { - GSettings *settings; - char *name; - g_object_unref (compare); - - settings = g_settings_new (HOME_NAME_SCHEMA); - name = g_settings_get_string (settings, HOME_NAME_KEY); - g_object_unref (settings); - - if (!(name && name[0])) - { - g_free (name); - return g_strdup (_("Home Folder")); - } - else - { - return name; - } + /* Translators: this is the same string as the one found in + * nautilus */ + return g_strdup (_("Home")); } - g_object_unref (compare); compare = g_file_new_for_path ("/"); if (g_file_equal (file, compare))